﻿using System;

namespace UnityEngine.PostProcessing
{
	// Token: 0x020000FC RID: 252
	[Serializable]
	public class EyeAdaptationModel : PostProcessingModel
	{
		// Token: 0x1700009F RID: 159
		// (get) Token: 0x06000629 RID: 1577 RVA: 0x000254A4 File Offset: 0x000236A4
		// (set) Token: 0x0600062A RID: 1578 RVA: 0x000254AC File Offset: 0x000236AC
		public EyeAdaptationModel.Settings settings
		{
			get
			{
				return this.m_Settings;
			}
			set
			{
				this.m_Settings = value;
			}
		}

		// Token: 0x0600062B RID: 1579 RVA: 0x000254B8 File Offset: 0x000236B8
		public override void Reset()
		{
			this.m_Settings = EyeAdaptationModel.Settings.defaultSettings;
		}

		// Token: 0x040005D3 RID: 1491
		[SerializeField]
		private EyeAdaptationModel.Settings m_Settings = EyeAdaptationModel.Settings.defaultSettings;

		// Token: 0x020000FD RID: 253
		public enum EyeAdaptationType
		{
			// Token: 0x040005D5 RID: 1493
			Progressive,
			// Token: 0x040005D6 RID: 1494
			Fixed
		}

		// Token: 0x020000FE RID: 254
		[Serializable]
		public struct Settings
		{
			// Token: 0x170000A0 RID: 160
			// (get) Token: 0x0600062C RID: 1580 RVA: 0x000254C8 File Offset: 0x000236C8
			public static EyeAdaptationModel.Settings defaultSettings
			{
				get
				{
					return new EyeAdaptationModel.Settings
					{
						lowPercent = 65f,
						highPercent = 95f,
						minLuminance = 0.03f,
						maxLuminance = 2f,
						exposureCompensation = 0.5f,
						adaptationType = EyeAdaptationModel.EyeAdaptationType.Progressive,
						speedUp = 2f,
						speedDown = 1f,
						logMin = -8,
						logMax = 4
					};
				}
			}

			// Token: 0x040005D7 RID: 1495
			[Tooltip("Filters the dark part of the histogram when computing the average luminance to avoid very dark pixels from contributing to the auto exposure. Unit is in percent.")]
			[Range(1f, 99f)]
			public float lowPercent;

			// Token: 0x040005D8 RID: 1496
			[Range(1f, 99f)]
			[Tooltip("Filters the bright part of the histogram when computing the average luminance to avoid very dark pixels from contributing to the auto exposure. Unit is in percent.")]
			public float highPercent;

			// Token: 0x040005D9 RID: 1497
			[Min(0f)]
			[Tooltip("Minimum average luminance to consider for auto exposure.")]
			public float minLuminance;

			// Token: 0x040005DA RID: 1498
			[Min(0f)]
			[Tooltip("Maximum average luminance to consider for auto exposure.")]
			public float maxLuminance;

			// Token: 0x040005DB RID: 1499
			[Tooltip("Exposure bias. Use this to control the global exposure of the scene.")]
			[Min(0f)]
			public float exposureCompensation;

			// Token: 0x040005DC RID: 1500
			[Tooltip("Use \"Progressive\" if you want the auto exposure to be animated. Use \"Fixed\" otherwise.")]
			public EyeAdaptationModel.EyeAdaptationType adaptationType;

			// Token: 0x040005DD RID: 1501
			[Tooltip("Adaptation speed from a dark to a light environment.")]
			[Min(0f)]
			public float speedUp;

			// Token: 0x040005DE RID: 1502
			[Tooltip("Adaptation speed from a light to a dark environment.")]
			[Min(0f)]
			public float speedDown;

			// Token: 0x040005DF RID: 1503
			[Range(-16f, -1f)]
			[Tooltip("Lower bound for the brightness range of the generated histogram (Log2).")]
			public int logMin;

			// Token: 0x040005E0 RID: 1504
			[Tooltip("Upper bound for the brightness range of the generated histogram (Log2).")]
			[Range(1f, 16f)]
			public int logMax;
		}
	}
}
